<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ include file="/inc/tag.inc"%>
<%@ include file="/inc/constants.inc"%>
<%@ include file="/inc/style.inc"%>
<%@ include file="/inc/script.inc"%>
<jsp:directive.page import="java.net.URLEncoder"/>
<jsp:directive.page import="sun.misc.BASE64Encoder"/>
<script type="text/javascript" src="${JS_PATH}/muen.js"></script>
<script type="text/javascript" src="${JS_PATH}/displaytagonoperation.js"></script>
<script type="text/javascript">
	/**------------------------------------------
	//@Author    :guanweichen
	//@CreateDate:2010-11-18
	//@Deprecated:修改分市场设置
	//
	-------------------------------------------**/
	function update(id){
	  	if(id==null||id==""){
	 		alert("请选择要编辑的分市场设置!");
	 		return;
	 	}
		var oServeletpath="${SERVELET_PATH}";
		var oWidth=600;
		var oHeight=220;
		var oActionPath="${actionpath}/jyFscszAction";
		var oMethod="goUpdate";
		var id=id;
		var oTitle="<%=URLEncoder.encode(new BASE64Encoder().encode("编辑分市场设置".getBytes("gbk")),"iso-8859-1") %>";
		var returnValue = doEdit(oServeletpath,oWidth,oHeight,oActionPath,oMethod,id,oTitle);
		if(returnValue == "succes"){
			ShowProgressInfo("请稍等...",true);
			jyFscszForm.submit();
		}
	 }
	/**------------------------------------------
	//@Author    :guanweichen
	//@CreateDate:2010-11-18
	//@Deprecated:删除分市场设置
	//
	-------------------------------------------**/
	 function del(id){
	 	if(id==null||id==""){
	 		alert("请选择要删除的分市场设置!");
	 		return;
	 	}
	 	if(window.confirm("您确定删除该分市场设置?!")){
	 	    ShowProgressInfo("请稍等...",true);
	 	    jyFscszForm.method.value = "delete";
	 	    jyFscszForm.id.value = id;
	 	    jyFscszForm.submit();
	 	}
	 }
	 
	 /**------------------------------------------
	//@Author    :guanweichen
	//@CreateDate:2010-11-18
	//@Deprecated:新增分市场设置
	//
	-------------------------------------------**/
	 function save(){
	 	var oServeletpath="${SERVELET_PATH}";
		var oWidth=600;
		var oHeight=220;
		var oActionPath="${actionpath}/jyFscszAction";
		var oMethod="goSave";
		var id="";
		var oTitle="<%=URLEncoder.encode(new BASE64Encoder().encode("新增分市场设置".getBytes("gbk")),"iso-8859-1") %>";
		var returnValue = doEdit(oServeletpath,oWidth,oHeight,oActionPath,oMethod,id,oTitle);
		if(returnValue == "succes"){
			ShowProgressInfo("请稍等...",true);
			jyFscszForm.submit();
		}
	}
</script>
<%-- Success Messages --%>
<logic:messagesPresent message="true">
	<script type="text/javascript">
		var message="<html:messages id='message' message='true'>${message}</html:messages>";
		message=message.replace(new RegExp("<br>","gm"),"\n");
		HideProgressInfo(true);
		alert(message);
	</script>
</logic:messagesPresent>
<html:html>
  <head>
    <title>区域管理</title>
  </head>
<body onload = "loadTable()" class="backcor">
<html:form action="/${actionpath}/jyFscszAction">	
	<html:hidden property="method" value="doDefault" />
	<html:hidden property="keyValue" value="" />
	<html:hidden property="id" value="" />
	<table height="100%" width="100%">	
		<tr>
			<td height="40px">
				<div class="xtmk" style="display: ''">
				<!--导航栏-->
					<table width="100%" border="0" cellspacing="0" cellpadding="0" align="left">
					  <tr > 
						<td width="22px"> <img src="${IMG_PATH }/home.gif" class="xtmk_img_home"/></td>
						<td width="40%">基本设置<img src="${IMG_PATH }/forward.gif"  class="xtmk_img_forward"><span class="a_title1">其他设置</span><img src="${IMG_PATH }/forward.gif"  class="xtmk_img_forward"><span class="a_title02">分市场设置</span></td>
						<td width="4%">&nbsp;</td>
						<td>&nbsp;</td>
					  </tr>
					</table>
				</div>
				<!--标题-->
				<div class="mkname">分市场设置列表</div>		
				<!--功能按钮-->
				<div class="operate">
					<input name="add" class="button_new" type="button" value="新增" onclick="javascript:save();"/>
				</div>
			</td>
		</tr>
		<tr>
			<td  align="center" valign="top">
	        	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	        		<tr >
					  <td align="left" class="thead_padding_right">
							<table  class="table_title">
								<tr class="SpaceLeft_1">
									<td align="center" class="Space_title" width="20%">市场名称</td>
									<td align="center" class="Space_title" width="15%">市场代码</td>
									<td align="center" class="Space_title" width="20%">市场域名</td>
									<td align="center" class="Space_title" width="15%">BSP频道代码</td>
									<td align="center" class="Space_title" width="15%">在总市场显示</td>
									<td align="center" class="Space_title" width="15%" style="border-right: none">操作</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>		
		<tr>
			<td height="100%" width="100%">
				<!--数据显示-->
				<div id="display" style="overflow-y: scroll; ">								
					<table  id="currentRowObject" >
						<logic:present name="result">
						<logic:iterate id="result" name="result" property="results"  indexId="index" >
						<tr>
							<td align="center"  width="20%"><bean:write name="result" property="mc" /></td>
							<td align="center"  width="15%"><bean:write name="result" property="dm" /></td>
							<td align="center"  width="20%"><bean:write name="result" property="ym" /></td>
							<td align="center"  width="15%"><bean:write name="result" property="pddm" /></td>
							<c:if test="${result.bz==1}">
								<td align="center"  width="15%">是</td>
							</c:if>
							<c:if test="${result.bz!=1}">
								<td align="center"  width="15%">否</td>
							</c:if>
							<td align="center" 	width="15%"><a onclick="javascript:update('<bean:write name="result" property="id" />')"><img src="${IMG_PATH }/edit.gif" alt="编辑" align="middle"/>&nbsp;编辑</a>&nbsp; &nbsp;<a onclick="javascript:del('<bean:write name="result" property="id" />')"><img src="${IMG_PATH }/delete.gif" alt="删除" align="middle"/>&nbsp;删除</a></td>
						</tr>
						</logic:iterate>
						</logic:present>
			    	</table>					
		   		 </div>		
			</td>
		</tr>
		<tr>
			<td height="20px">
				<div id="pagediv">
					<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
				      <tr>
				       <td align="right">
							<baosight:page noForm="result" className="result" formName="jyFscszForm" />
						</td>
				      </tr>
					</table>
				</div>
			</td>
		</tr>
		</table>
		<DIV class="menuDiv" id="IEmenu" onMouseOver="highlightIE()"  onmouseout="lowlightIE()" style="display: none">
			<DIV id="addMenu"	><span class="menuItems" onclick="javascript:save()" >新增</span></DIV>
			<DIV id="updateMenu"><span class="menuItems" onclick="javascript:update()">编辑</span></DIV>
			<DIV id="deleteMenu"><span class="menuItems" onclick="javascript:del()">删除</span></DIV>
		</DIV>
</html:form>
</body>
</html:html>
